<template>
  <view class="user-card">
    <image class="avatar" :src="user.avatar" />
    <view class="user-info">
      <text class="nickname">{{ user.nickname }}</text>
      <text class="desc">{{ user.desc }}</text>
    </view>
    <view class="edit-icon">
      <text class="iconfont icon-edit"></text>
    </view>
  </view>
</template>

<script>
export default {
  name: "UserCard",
  props: {
    user: Object
  }
}
</script>

<style scoped>
.user-card {
  display: flex;
  align-items: center;
  background: #19c37d;
  padding: 24rpx 0 32rpx 0;
  flex-direction: column;
}

.avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 50%;
  margin-bottom: 12rpx;
}

.nickname {
  color: #fff;
  font-size: 36rpx;
  font-weight: bold;
}

.desc {
  color: #fff;
  font-size: 24rpx;
  margin-top: 8rpx;
}

.edit-icon {
  position: absolute;
  right: 40rpx;
  top: 40rpx;
  color: #fff;
}
</style>